<template>
	<view>
		<!-- 投资项目阶段评价审批 -->
		<view class="head_tb">
			<u-tabs :activeStyle="{
						 fontSize:'32rpx',
						 color: '#007aff'
			         }" :inactiveStyle="{
						 fontSize:'30rpx'
			         }" :scrollable='false' :lineWidth='30' itemStyle='height:90rpx;width:33%' :list="list1" @click="checkbtn">
			</u-tabs>
		</view>

		<!-- 基本信息 -->
		<view class="msp">
			<CellChild :addlist='addlist' title='基本信息' id='add_one' :fileNo = 'fileNo' :rows='rows'>
			</CellChild>
		</view>

		<!-- 现状及目标 -->
		<CellChild :addlist='celllist' title='现状及目标' id='add_two' :rows='rows' />

		
		<!-- 领导评价及指摘 -->
		<CellChild :addlist='celllist1' title='领导评价及指摘' id='add_three' :rows='rows'/>

	</view>
</template>

<script>
	export default {
		components:{
		},
		data() {
			return {
				list1: [{
						name: '基本信息',
					},
					{
						name: '项目信息'
					},
					{
						name: '子项目明细'
					},
				],
				cellshow: true,
				addlist: [{
						tit: '单据编号',
						val: 'billNo'
					},
					{
						tit: '预算编号',
						val: 'budgetNo'
					},
					{
						tit: '预算名称',
						val: 'proName'
					},
					{
						tit: '版次',
						val: 'revision'
					},
					{
						tit: '评价判定',
						val: 'evaluationJudge'
					},
					{
						tit: '项目主题',
						val: 'proTheme'
					},
					{
						tit: '担当部门',
						val: 'empOrg'
					},
					{
						tit: '时间',
						val: 'time'
					},
					{
						tit: '地点',
						val: 'address'
					},
					{
						tit: '项目担当',
						val: 'userDesc'
					},
					{
						tit: '评价层次',
						val: 'evaluationLevel'
					},
					{
						tit: '次数',
						val: 'count'
					},
					{
						tit: '出席人员',
						val: 'attendees'
					},
					{
						tit: '本次评价事项',
						val: 'evaluationItems'
					},
					{
						tit: '评价判定',
						val: 'evaluationJudge'
					},
				],
				celllist: [{
						tit: '现状',
						val: 'presentSituation'
					},
					{
						tit: '目标',
						val: 'target'
					}
				],
				celllist1: [{
						tit: '指摘',
						val: 'accuse'
					},
					{
						tit: '建议',
						val: 'proposal'
					},
					{
						tit: '其他',
						val: 'other'
					},
				],
				rows:[],
				fileNo:[]
			}
		},
		onload() {
			//获取流程页面的流程上下文[实用的流程信息从这里获取]
			 let billNo= window.parent.myvm.wfContext.BusinessKey;
			 this.fileNo = window.parent.myvm.wfContext.BusinessKey;
			 this.getlist(billNo)
		},
		mounted() {
			var that = this;
			window.myvm = that;
			window.$urlFormVue = that;
		},
		methods: {
			//审批和驳回-工作流点击"提交"时触发此函数，返回:空字符串:工作流继续提交，返回"具体错误信息":工作流不提交
			rejectWorkflow(btnDef) {
				return "";
			},
			//作废-工作流点击"作废"时触发此函数，返回:空字符串:工作流继续提交，返回"具体错误信息":工作流不提交
			//content为作废意见
			invalidWorkflow(content) {
				return "";
			},
			//转办-工作流点击"确认转办"时触发此函数，返回:空字符串:工作流继续提交，返回"具体错误信息":工作流不提交
			//opinion:转办意见
			referredWorkflow(opinion) {
				return "";
			},
			//校验-工作流点击"提交"时触校验函数，返回:true校验通过，false校验不通过；
			//也可以返回具体的错误信息：空字符串，校验通过，返回具体错误信息校验不通过，同时弹出具体的错误信息。
			validateWorkflowForm(btnDef,callback) {
				callback("");
			},
			//提交单据
			sendWorkflow(btnDef, callback) {
				callback("");
			},
			getlist(billNo){
				let _this = this
				const params = {
					billNo
				}
				_this.$lyRequest.get('/gateway/budget/mp/dbsap/investEvaluate/queryDetail.do',
					params
				).then((result)=>{
					if(result.success){
						this.rows = result.data.rows
					}else{
						console.log(result.data.msg)
					}
				})
			},
			checkbtn(item) { //切换tabs
				console.log(item)
				if (item.index === 0) {
					this.commonApi.goAnchor('add_one')
				} else if (item.index === 1) {
					this.commonApi.goAnchor('add_two')
				} else if (item.index === 2) {
					this.commonApi.goAnchor('add_three')
				}
			},

		}
	}
</script>

<style scoped lang="scss">
	view {
		font-family: pf;
	}

	.bottom_setup {
		width: 100%;
		height: 160rpx;
		background-color: white;
		margin-top: 20rpx;
		padding: 35rpx 0;
		box-sizing: border-box;
		box-shadow: 5px -10rpx 5px 0px rgba(225, 225, 225, .4), ;

		.bottom_white1 {
			display: flex;
			flex-direction: row;
			align-items: center;
			justify-content: space-between;
			height: 100rpx;

			.custom-styles {
				padding: 20rpx 30rpx;
				width: 300rpx;
				height: 100rpx;
			}

			.custom-style {
				padding: 20rpx 30rpx;
				width: 300rpx;
				height: 100rpx;
				background-color: #007aff;
			}
		}
	}
</style>
